<?php
namespace Menu\Controller;
use Think\Controller;
class UserController extends LoginController {
	protected $DB;
	public function __initialize(){
		parent::__initialize();
		$this->DB = D('Users');
	}
	public function Add(){
		$this->display();
	}

	public function Read(){
		$dataList= $this->DB->userSel();
		$this->assign('List',$dataList['list']);
		$this->assign('page',$dataList['page']);
		$this->display();
	}

	public function UserAdd(){
		// dump($_POST);die;
		$data = $this->DB->userAdd();
		if($data['num']){
			$this->success($data['info']);
		}
	}
}	